<template>
    <div class="PyReport">
        <DashHeader/>
        <el-main>
        <div id="iframeId"></div>
        </el-main>
    </div>

</template>

<script>
import  DashHeader from '@/components/DashHeader';
import { useRoute } from 'vue-router'

export default {
   name: 'PyReport',
   components: {
       DashHeader
   },
   data() {
       return {
           reportname: '',
           reportUrl: ''
       }    
   },
   mounted() {  
       const route = useRoute()
       console.log(route.query)   
       this.reportUrl = route.query.planresult,
       console.log(this.reportUrl)
       //this.reportUrl = "http://10.100.0.171:3010" + "/result/report" + this.reportname + ".html";
       var iframe = document.createElement("iframe");
       iframe.id = "iframe1";
       iframe.src = this.reportUrl;
       document.getElementById('iframeId').appendChild(iframe);
       iframe.width='100%';
       iframe.height='800px';
       iframe.frameBorder='0'
   }
}
</script>